<!DOCTYPE html>
<html>
{include file="head.html"}
 
<body>
 <div class="fullscreen">

	<div class="topfixed">
       <div class="t_left"><a href="/index.php?m=forum&a=my" class="goBack"><i class="back"></i></a></div>
       <div class="t_main">发布帖子</div>
   	   
    </div> 
    <div class="paddingheight"></div>

<div id="page" data-role="page">
 
    <div class="main-body pd-5">
    <form method="post" action="{$appadmin}?m=forum&a=save&ajax=1" id="upload_form" class="form-horizontal ">
    <input type="hidden" name="id" value="{$data.id}" />
    <input type="hidden" name="imgurl" id="imgurl" class="imgurl" value="{$data.imgurl}">
      <div class="input-row">
             
            <input type="text" name="title"  class="txt"   id="title" value="{$data.title}" placeholder="请输标题"  >
        
        </div>    
        
        
        <div class="input-row">
            
             <select name="catid" class="txt">
        <option value="0">请选择</option>
        {foreach item=c from=$cat_list}
                    <option value="{$c.catid}" {if $data.catid eq $c.catid or get('catid') eq $c.catid} selected="selected"{/if}>{$c.cname}</option>
                    {foreach item=c_2 from=$c.child}
                        <option value="{$c_2.catid}" {if $data.catid eq $c_2.catid or get('catid') eq $c_2.catid} selected="selected"{/if} class="o_c_2">|__{$c_2.cname}</option>
                        {foreach item=c_3 from=$c_2.child}
                        <option value="{$c_3.catid}" {if $data.catid eq $c_3.catid or get('catid') eq $c_3.catid} selected="selected"{/if} class="o_c_3"> |____{$c_3.cname}</option>
                        {/foreach}
                    {/foreach}
                    {/foreach}
        </select>
             
        </div>
     
   
      
       <div class="area-row">
             
            <div style="width:90%; margin:0 auto; margin-bottom:10px;">
            <script type="text/html" style="height:300px;" name="content" id="content">{$data.content}</script>
            </div>
      </div>
            <div class="clearfix"></div>
        </div>  
     <div class="row">
     	{assign var="tablename" value="forum"}
     	 {include file="picsup.html"} 
     </div>  
    <div class="form-btns">
    
      <button type="button" name="button" id="post-submit" class="btn btn-success btn-larger" value="">发布帖子</button>  
    </div>
    <div style="clear:both;"></div>
    </form>
    </div>
    {include file="footer.html"}
</div>

{php loadEditor();} 
<script language="javascript" src="/plugin/My97DatePicker/WdatePicker.js"></script> 
<script src="/plugin/skyweb/lrz.mobile.min.js" ></script>
<script src="/static/js/upload_wap.js"></script>
<script>
var editor=UE.getEditor('content',options)
$(function(){
	$("#post-submit").on("click",function(){
		var iu=$("#imgurl").val();
		if(iu==''){
			
		}
		$.post($("#upload_form").attr("action"),$("#upload_form").serialize(),function(data){
	
			if(!data.error){
				skyToast("发布成功");
				setTimeout(function(){
				goBack();
				},1000);
			}else{
				skyToast(data.message);
			}
		},"json");
	});
});
</script>

</body>
</html>